import React, { Component } from 'react'
import '../assets/style/house_c.less';

export default class House extends Component {
    constructor(props){
        super(props)
    }
    render() {
        return (
                <div >
                    {
                        this.props.list.map((v,i)=>{
                            return (
                                <div key={i} className="house-make">
                                    <img src={v.image} alt="" />
                                    <div className="house-body">
                                        <p>{v.name}</p>
                                        <div className="prise">
                                            <p>{v.city}</p>
                                            <p style={{color: "#04AD04",fontWeight: 'bold'}}>{v.price}㎡</p>
                                        </div>
                                        <div className="list-body">
                                            {
                                                v.tag.split(' ').map((value,index)=>{
                                                    return (
                                                        <p key={index} className="tag">{value}</p>
                                                    )
                                                })
                                            }
                                        </div>
                                        <p onClick={()=>this.props.onClick(v.name)}>进入客服</p>
                                    </div>
                                </div>
                            )
                        })
                    }
                </div>
        )
    }
}